package com.example.planetexploder.utils.screenshot;

import android.widget.ImageView;
import android.widget.RelativeLayout;

/**
 * 移动控件
 * @author 宋熙然
 * 修改日期：2019.10.24
 */
public class MoveWidget {
    public static void moveImageView(ImageView iv, int left, int top) {
        RelativeLayout.LayoutParams layoutParams1 = (RelativeLayout.LayoutParams) iv.getLayoutParams();
        layoutParams1.leftMargin = left;
        layoutParams1.topMargin = top;
        iv.setLayoutParams(layoutParams1);
    }
}
